https: limit proxy CONNECT response headers#64545
Open
mcollina wants to merge 2 commits into
Open
Conversation
Apply the configured maximum header size while reading CONNECT responses. Rearm the readable listener only once per read pass to avoid unbounded buffer and listener growth. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Collaborator
|
Review requested:
|
mcollina
marked this pull request as ready for review
July 16, 2026 19:37
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64545 +/- ##
==========================================
- Coverage 90.24% 90.15% -0.10%
==========================================
Files 739 741 +2
Lines 241667 242079 +412
Branches 45550 45572 +22
==========================================
+ Hits 218093 218240 +147
- Misses 15109 15353 +244
- Partials 8465 8486 +21
🚀 New features to boost your workflow:
|
pimterry
approved these changes
Jul 17, 2026
Collaborator
joyeecheung
reviewed
Jul 17, 2026
|
|
||
| function establishTunnel(agent, socket, options, tunnelConfig, afterSocket) { | ||
| const { proxyTunnelPayload } = tunnelConfig; | ||
| const maxHeaderSize = tunnelConfig.requestOptions.maxHeaderSize || |
Member
There was a problem hiding this comment.
This can be configured in getTunnelConfigForProxiedHttps instead.
jasnell
approved these changes
Jul 19, 2026
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
readablelistener while waiting for additional response data